//
//  MoreESRootClass.m
//  __PRODUCTNAME__
//
//  Created by dllo on 16/08/30
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "MoreESRootClass.h"
#import "MoreApps.h"
#import "MoreGrids.h"
#import "MoreBanner_Brand.h"

@implementation MoreESRootClass
- (void)setValue:(id)value forKey:(NSString *)key
{
    [super setValue:value forKey:key];
    NSMutableArray *apps = [NSMutableArray array];
    if ([key isEqualToString:@"apps"]) {
        for (NSDictionary *dic in value) {
        MoreApps *moreApps = [MoreApps modelWithDic:dic];
            [apps addObject:moreApps];
        }
        _apps = apps;
        
    } else if ([key isEqualToString:@"grids"]) {
        NSMutableArray *grids = [NSMutableArray array];
            for (NSDictionary *dic in value) {
                
            MoreGrids *moreGrids = [MoreGrids modelWithDic:dic];
                [grids addObject:moreGrids];
            }
            _grids = grids;
        }

     else if ([key isEqualToString:@"banner_brand"]) {
            NSMutableArray *banner_brand = [NSMutableArray array];
            for (NSDictionary *dic in value) {
                MoreBanner_Brand *moreBanner_Brand = [MoreBanner_Brand modelWithDic:dic];
                [banner_brand addObject:moreBanner_Brand];
            }
            _banner_brand = banner_brand;
        }
    }
    



+ (NSDictionary *)objectClassInArray{
    return @{@"apps" : [MoreApps class], @"grids" : [MoreGrids class], @"banner_brand" : [MoreBanner_Brand class]};
}

@end
